#-*- coding:utf-8 -*-

import models
from django.contrib.admin.models import User
from django.db.models import signals

def init_abuse_data(sender, *args, **kwargs):
    ab_choice = sender.AbuseChoice    
    ab_choice.objects.get_or_create(code='spam', text='Spam')
    ab_choice.objects.get_or_create(code='offense', text='Offensive content')
    ab_choice.objects.get_or_create(code='illegal', text='Illegal content')
    ab_choice.objects.get_or_create(code='porn', text='Pornography')
    ab_choice.objects.get_or_create(code='other', text='Other')

def test_data(sender, *args, **kwargs):
    User.objects.create_user('teste', 'teste@teste.com', 'teste')
    User.objects.create_user('teste2', 'teste2@teste.com', 'teste2')
    User.objects.create_user('teste3', 'teste3@teste.com', 'teste3')

signals.post_syncdb.connect(init_abuse_data, models, dispatch_uid='forum_init_abuse_data')
#signals.post_syncdb.connect(test_data, models, dispatch_uid='forum_test_data')
